<?php
require_once 'conexion/conexion.php';

class insertarusos extends Conexionexplo
{

public function insertarUso($US,$TX){

	if(!empty($_POST['us']))
{
    $TEX = $US;
	$TEX = $_POST['tex'];
	
	
	

if( $_POST)
{
for($i=0;$i<sizeof($US);$i++){

 $sql = "INSERT INTO ma_af_usotierra ( MA_V_TipoUsos,MA_Dc_CantHec)
 	 VALUES ('".$US[$i]."','".$TEX[$i]."')";

     $conectarBD =$this->Conectar();
      mysqli_query($conectarBD,$sql) or die('no insertado'.mysqli_error($conectarBD));

      if($conectarBD){

header('location:index.php');

}}}}
      }
}

      
?>